/**
 * @author zhoushengtao
 * @since 2012-8-23 下午4:04:44
 */

package com.stchou.superbrowser.ui.widget;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;

public class SuperTextView extends TextView
{

    private Context m_context;
    private  Typeface m_typeFace;
    /**
     * @param context
     */
    public SuperTextView(Context context)
    {
        super(context);
        m_context = context;
    }
    
    public SuperTextView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
        m_context = context;
        init();
    }
    
    
    public void init()
    {
       //将字体文件保存在assets/fonts/目录下，创建Typeface对象
        m_typeFace = Typeface.createFromAsset(m_context.getAssets(), "fonts/ground_round.ttf");
        //应用字体
        setTypeface(m_typeFace);
    }
    
}
